Skip to content

Instantly share code, notes, and snippets.

@gabe565
gabe565 / change-arc-icon.md
Last active May 9, 2024 21:50
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@backroot
backroot / get_http_header.cgi
Last active May 9, 2024 21:49
Get HTTP Headers by perl
#!/usr/bin/perl --
use strict;
use warnings;
use CGI;
my $q = CGI->new;
my %headers = map { $_ => $q->http($_) } $q->http();
print $q->header('text/plain');
print "------------------------------\n";
[ req ]
default_bits = 2048
default_keyfile = server-key.pem
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
string_mask = utf8only
[ subject ]
@plembo
plembo / pandocdocx2md.md
Last active May 9, 2024 21:43
Convert docx to markdown with pandoc

Convert Word documents to markdown with pandoc

I use pandoc to convert masses of Word documents to markdown. Still working on a generic script, but for now here's the "gist" of what I type into the terminal:

$ myfilename="example"
$ pandoc \
-t markdown_strict \
--extract-media='./attachments/$myfilename' \
$myfilename.docx \
@plammens
plammens / unionenum.py
Last active May 9, 2024 21:34
Enum union in Python
"""
Enum union based on and compatible with the standard library's `enum`.
"""
# MIT License
#
# Copyright (c) 2020 Paolo Lammens
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
import {
Component,
Input,
OnChanges,
SimpleChanges,
OnDestroy,
} from '@angular/core';
import {
MatDialogRef,
MatDialogConfig,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Reflection.Emit;
using System.Collections.Concurrent;
using System.Data;
using System.Reflection;
@abir-taheer
abir-taheer / instagram-follower-following.js
Last active May 9, 2024 21:26
"This is our community, this is our family, these are our friends." https://www.youtube.com/watch?v=gk7iWgCk14U&t=425s
if (window.location.origin !== "https://www.instagram.com") {
window.alert(
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.",
);
window.location.href = "https://www.instagram.com";
console.clear();
}
const fetchOptions = {
credentials: "include",
@benlansdell
benlansdell / filepicker.py
Last active May 9, 2024 21:24
FilePicker for streamlit
"""FilePicker for streamlit.
Still doesn't seem to be a good solution for a way to select files to process from the server Streamlit is running on.
Here's a pretty functional solution.
Usage:
```
import streamlit as st

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r